﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3;
internal struct ExcellFile 
{
    public ExcellFile(FileInfo file)
    {
        FullName = file.FullName;
        Name = Path.GetFileNameWithoutExtension(file.Name);
        var s = Name.Split('-');
        MinId = decimal.Parse(s[0]);
        MaxId = decimal.Parse(s[1]);
    }
    public string Name { get; set; }
    public string FullName { get; set; }
    public decimal MinId { get; set; }
    public decimal MaxId { get; set; }

    public override bool Equals(object? obj)
    {
        return obj is ExcellFile file &&
               Name == file.Name;
    }

    public override int GetHashCode()
    {
        return HashCode.Combine(Name);
    }
}
